<?php

namespace App\Model;

use Illuminate\Database\Eloquent\Model;

/**
 * App\Model\CardFriendlyLinks
 *
 * @property-read \App\Model\Cards $card
 * @mixin \Eloquent
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\CardFriendlyLinks newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\CardFriendlyLinks newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\CardFriendlyLinks query()
 * @property int $id
 * @property int $user_id 名片id
 * @property int $friend_card_id 链接的名片id
 * @property \Illuminate\Support\Carbon $created_at 创建日期
 * @property \Illuminate\Support\Carbon $updated_at 修改时间
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\CardFriendlyLinks whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\CardFriendlyLinks whereFriendCardId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\CardFriendlyLinks whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\CardFriendlyLinks whereUpdatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\CardFriendlyLinks whereUserId($value)
 */

class CardFriendlyLinks extends Model
{
    protected $table = 'card_friendly_links';
    protected $primaryKey = 'id';
    protected $dates = ['deleted_at'];

    public function card()
    {
        return $this->belongsTo(Cards::class, 'friend_card_id', 'id');
    }
}
